To help developers choose the best data handler for a specific situation while still making it easy for an application to find a usable data handler, Apple has defined two separate and complementary mechanisms for selecting data handler components. You can use the Component Manager's selection mechanisms to find a data handler that meets your needs, or you can interrogate a data handler to determine if it supports a specific data reference. Both mechanisms rely on characteristics of the current data reference in order to make the selection.
Before you can use a data handler component, your application must open a connection to that component. The easiest way to open a connection to a data handler component is to call the Movie Toolbox's GetDataHandler function. You supply a data reference and the Movie Toolbox selects an appropriate data handler component for you. This function is preferred for opening a data handler as it reliably chooses the best data handler. For more information about this function, see the chapter "Movie Toolbox" in Inside Macintosh: QuickTime.
Alternatively, you may use the Component Manager to open your connection. Call the Component Manager's OpenDefaultComponent or OpenComponent function to do so, but be aware that these functions are often unable to make the best choice when there are several different data handlers available for a file.
| Previous | Chapter Contents | Chapter Top | Next |